<template>
  <div class="threeGod">
    <div class="container">
      <div class="cycle white"></div>
      <div class="cycle red"></div>
      <div class="cycle green"></div>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
export default defineComponent({});
</script>
<style lang="scss" scoped>
.threeGod {
  .container {
    width: 9rem;
    height: 9rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cycle {
    position: absolute;
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
  }
  .white {
    background-color: #fff;
    z-index: 3;
    animation: shake 0.4s infinite;
  }
  .red {
    z-index: 2;
    background-color: red;
    animation: shake 0.3s infinite;
    animation-delay: 0.1s;
  }
  .green {
    z-index: 1;
    background-color: green;
    animation: shake 0.3s infinite;
    animation-delay: 0.2s;
  }

  @keyframes shake {
    0% {
      transform: translate(-3px, -6px);
    }
    25% {
      transform: translate(0px, 6px);
    }
    50% {
      transform: translate(3px, -6px);
    }
    75% {
      transform: translate(-4px, 2px);
    }
    100% {
      transform: translate(4px, 2px);
    }
  }
}
</style>
